/*
 * Copyright (C) 2008 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * package-level logging flag
 */

package android.contest.util;

import android.contest.constant.Constant;
import android.util.Config;

public class Log {
    public final static String LOGCONN = "ConnService";
    public final static String LOGWEATHER = "fwudebuglog";
    public final static String LOGALARM = "AlarmClock";
    public final static String LOGDB = "alarmDB";

    public static final boolean LOGV = Constant.DEBUG ? Config.LOGD : Config.LOGV;

    public static void v(String logMe) {
        if(LOGV)android.util.Log.v(LOGALARM, /* SystemClock.uptimeMillis() + " " + */ logMe);
    }

    public static void d(String logMe) {
    	if(LOGV)android.util.Log.d(LOGALARM, logMe);
    }
    
    public static void e(String logMe) {
    	if(LOGV)android.util.Log.e(LOGALARM, logMe);
    }

    public static void e(String logMe, Exception ex) {
    	if(LOGV)android.util.Log.e(LOGALARM, logMe, ex);
    }
    
    public static void v(String tag, String logMe) {
    	if(LOGV)android.util.Log.v(tag, /* SystemClock.uptimeMillis() + " " + */ logMe);
    }

    public static void d(String tag, String logMe) {
    	if(LOGV)android.util.Log.d(tag, logMe);
    }
    
    public static void e(String tag, String logMe) {
    	if(LOGV)android.util.Log.e(tag, logMe);
    }

    public static void e(String tag, String logMe, Exception ex) {
    	if(LOGV)android.util.Log.e(tag, logMe, ex);
    }
}
